//
//  MoveByForward.h
//  client
//
//  Created by DuanHongbo on 15/1/29.
//
//

#ifndef __client__MoveByForward__
#define __client__MoveByForward__

#include <stdio.h>
#include "cocos2d.h"


USING_NS_CC;

class MoveByForward : public MoveBy
{
public:
    /** creates the action */
    static MoveByForward* create(float duration, const Vec2& deltaPosition,bool autoHeadOn = false, float initAngle = 0);
    
    // override super
    virtual MoveByForward* clone() const override;
    virtual MoveByForward* reverse()const override;
CC_CONSTRUCTOR_ACCESS:
    MoveByForward();
    virtual ~MoveByForward();
    
    /** initializes the action */
    bool initWithDuration(float duration, const Vec3& position,bool autoHeadOn , float initAngle);

    // override super
    virtual void update(float time) override;
private:
    CC_DISALLOW_COPY_AND_ASSIGN(MoveByForward);
    
    CC_SYNTHESIZE(bool,m_autoHeadOn, AutoHeadOn);
    CC_SYNTHESIZE(float, m_initAngle, InitAngle);
};
#endif /* defined(__client__MoveByForward__) */
